home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / CoreGateway / GatewayConfig.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  1.9 KB  |  64 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        GatewayConfig.h
  3.  
  4.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Part of the AOCE Sample SMSAM Package.  Consult the license
  8.     which came with this software for your specific legal rights.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __GATEWAYCONFIG__
  15. #define __GATEWAYCONFIG__
  16.  
  17. #ifndef __BLJSTANDARDINCLUDES__
  18. #include "BLJStandardIncludes.h"
  19. #endif
  20.  
  21. #ifndef __HANDLEOBJECT__
  22. #include "HandleObject.h"
  23. #endif
  24.  
  25. class TADASTupleDatabase;
  26.  
  27. TADASTupleDatabase* GetConfigurationDB();
  28.  
  29. //    This function 'sets up' the configuration database.  The whichDB parameters should be
  30. //    the name of a file of type 'pref', creator 'BOVJ', located in the boot volume's
  31. //    preferences folder.  This file contains the information which is needed to
  32. //    actually bootstrap the configuration database.  If the configuration database
  33. //    can correctly be set up, then this function returns true, otherwise it returns false.
  34.  
  35. Boolean SetupConfigurationDB (short vRefNum, long dirID, Str63 whichDB);
  36.  
  37. //    This function creates a configuration file in the local preferences file (see the
  38. //    SetupConfigurationDB function).  This function does not set up the configuration
  39. //    database.  If the preferences file is successfully created, then this function
  40. //    returns true, otherwise it returns false.
  41.  
  42. Boolean CreateConfigurationDB(short vRefNum, long dirID, Str63 whichDB);
  43.  
  44.  
  45.  
  46. //    These are a bunch of 'short-hand' functions for getting certain types of data out
  47. //    of the configuration database.
  48.  
  49. Boolean GetConfigCString (char* itemName, char* buffer, short maxBufferSize);
  50. Boolean GetConfigRString (char* itemName, RString& item);
  51. Boolean GetConfigLong (char* itemName, long& item);
  52.  
  53.  
  54.  
  55. #if debug
  56.  
  57. //    This function creates a 'special' preferences file which will use a local (non-ADAS)
  58. //    database instead of the ADAS database setup by the standard CreateConfigurationDB().
  59. Boolean CreateLocalConfigurationDB(short vRefNum, long dirID, Str63 whichDB);
  60.  
  61. #endif
  62.  
  63.  
  64. #endif